import { useObservable } from '@gnlab/utils/env-react/rx'
import { App } from 'antd'
import services from '@/services'

export function useChatNotications() {
  const { modal } = App.useApp()
  useObservable(services.chat.intercepted, () => {
    modal.warning({
      title: '提示',
      content: '当前要发送的内容触发敏感内容规则，已被拦截，将不会被发出。如有疑问，请联系管理员。',
      okText: '我知道了',
    })
  })
}
